<html>
 <head>
  <link href="./leetcode-problem.css" rel="stylesheet" type="text/css">
 </head>
 <body>
  <div class="question_difficulty">
   难度：Easy
  </div>
  <div>
   <h1 class="question_title">
    551. Student Attendance Record I
   </h1>
   You are given a string representing an attendance record for a student. The record only contains the following three characters:
   <p>
   </p>
   <ol>
    <li>
     <b>
      'A'
     </b>
     : Absent.
    </li>
    <li>
     <b>
      'L'
     </b>
     : Late.
    </li>
    <li>
     <b>
      'P'
     </b>
     : Present.
    </li>
   </ol>
   <p>
    A student could be rewarded if his attendance record doesn't contain
    <b>
     more than one 'A' (absent)
    </b>
    or
    <b>
     more than two continuous 'L' (late)
    </b>
    .
   </p>
   <p>
    You need to return whether the student could be rewarded according to his attendance record.
   </p>
   <p>
    <b>
     Example 1:
    </b>
    <br>
   </p>
   <pre>
<b>Input:</b> "PPALLP"
<b>Output:</b> True
</pre>
   <p>
    <b>
     Example 2:
    </b>
    <br>
   </p>
   <pre>
<b>Input:</b> "PPALLL"
<b>Output:</b> False
</pre>
  </div>
  <div>
   <h1 class="question_title">
    551. 学生出勤记录 I
   </h1>
   <p>
    给定一个字符串来代表一个学生的出勤记录，这个记录仅包含以下三个字符：
   </p>
   <ol>
    <li>
     <strong>
      'A'
     </strong>
     : Absent，缺勤
    </li>
    <li>
     <strong>
      'L'
     </strong>
     : Late，迟到
    </li>
    <li>
     <strong>
      'P'
     </strong>
     : Present，到场
    </li>
   </ol>
   <p>
    如果一个学生的出勤记录中不
    <strong>
     超过一个'A'(缺勤)
    </strong>
    并且
    <strong>
     不超过两个连续的'L'(迟到)
    </strong>
    ,那么这个学生会被奖赏。
   </p>
   <p>
    你需要根据这个学生的出勤记录判断他是否会被奖赏。
   </p>
   <p>
    <strong>
     示例 1:
    </strong>
   </p>
   <pre><strong>输入:</strong> "PPALLP"
<strong>输出:</strong> True
</pre>
   <p>
    <strong>
     示例 2:
    </strong>
   </p>
   <pre><strong>输入:</strong> "PPALLL"
<strong>输出:</strong> False
</pre>
  </div>
 </body>
</html>